package Flap::OS;
use Flap qw/-b Flap::Object -m -r -s -w/;
our $IN_TAINT_MODE;

sub in_taint_mode {
    $IN_TAINT_MODE = !eval{ ``; 1; } || 0 if !defined $IN_TAINT_MODE;
    $IN_TAINT_MODE;
}

sub is_eml { shift->project->Validator->is_eml(@_) }

sub is_path {
    (
        defined($_[1])
     && $_[1] !~ m%\.\.|//%
     && $_[1] =~ m%^((?:[A-Z]:)?[./0-9A-Za-z_](?:[\-./0-9A-Za-z_]*[/0-9A-Za-z_])?)\z%
     && $1
    );
}

1;
